//
//  GPMessageCell.h
//  GuaPi
//
//  Created by 陈华 on 2017/6/20.
//  Copyright © 2017年 Joanlove. All rights reserved.
//

#import <UIKit/UIKit.h>
#import "GPMessageItem.h"

@class GPMessageCell;
@protocol GPMessageCellDelegate <NSObject>


/**
 点击了cell上的发送失败icon

 @param cell 当前的cell
 @param messageItem 当前的messageItem
 */
- (void)messageCell:(GPMessageCell *)cell didFailedIconClicked:(GPMessageItem *)messageItem;

- (void)messageCell:(GPMessageCell *)cell didContentClicked:(GPMessageItem *)messageItem;

@end

@interface GPMessageCell : UITableViewCell

#pragma mark - UI属性
/**时间Label*/
@property(nonatomic,weak) UILabel *timeLabel;
/**群成员昵称*/
@property(nonatomic,weak) UILabel *nicknameLabel;
/**头像*/
@property(nonatomic,weak) UIImageView *iconImageView;
/**内容背景*/
@property(nonatomic,weak) UIView *contentBackground;
/**消息发送指示器*/
@property(nonatomic,weak) UIActivityIndicatorView *sendingIndicatorView;
/**消息发送失败icon*/
@property(nonatomic,weak) UIImageView *sendFaildIcon;

#pragma mark - 数据属性
/**消息模型*/
@property(nonatomic,strong) GPMessageItem *message;
/**代理*/
@property(nonatomic,weak) id<GPMessageCellDelegate> delegate;


#pragma mark - 工具方法
+ (Class)cellClassWithMessage:(GPMessageItem *)message;
+ (NSString *)reuseIdWithMessage:(GPMessageItem *)message;

@end
